Skip to content

fix srcset import when attribute uses whitespace #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix srcset import when attribute uses whitespace #1

wants to merge 1 commit into from

Conversation

therealpecus
Copy link

covers cases like:

<img srcset="
    ../image.jpg 1x, 
    ../image.2x.jpg 2x,
    ../image.1920x1280.jpg 1920w
" alt="srcset on multiple lines and with extra whitespace">

covers cases like:
```
<img srcset="
    ../image.jpg 1x, 
    ../image.2x.jpg 2x,
    ../image.1920x1280.jpg 1920w
" alt="srcset on multiple lines and with extra whitespace">
```
@therealpecus
Copy link
Author

Hi AndreKR,

Your code was a great starting point in fixing the missing srcset implementation. I discovered a few issues (namely, missing support for picture elements and code breaking when the srcset attribute is on multiple lines) that I fixed with minimal changes.

@AndreKR
Copy link
Owner

AndreKR commented Sep 19, 2017

Cherry-picked into vuejs#953

@AndreKR AndreKR closed this Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants